from google.appengine.ext import db

"""
    Restaurant:        main table of restaurant
    RestKeyWord:        
"""

class Restaurant(db.Model):
    country_key = db.StringProperty(required=True)
    city_key = db.StringProperty(required=True)
    mall_key = db.StringProperty(required=True)
    mtr_key = db.StringProperty(required=True)
    type_key = db.StringProperty(required=True)
    foodtype_key = db.StringProperty(required=True)
    avg_key = db.StringProperty(required=True)
    occa_key = db.StringProperty(required=True)
    district_key = db.StringProperty(required=True)
    group_key = db.StringProperty
    

class RestCountry(db.Model):
    """This is a CodeTable"""
    country_name_short = db.StringProperty()
    country_name_big5 = db.StringProperty()
    country_name_eng = db.StringProperty()
    country_name_gb = db.StringProperty()

class RestCity(db.Model):
    """This is a CodeTable"""
    city_country = db.ReferenceProperty(RestCountry)
    city_name_short = db.StringProperty()
    city_name_big5 = db.StringProperty()
    city_name_eng = db.StringProperty()
    city_name_gb = db.StringProperty()

class RestMall(db.Model):
    """This is a CodeTable"""

class RestMtr(db.Model):
    """This is a CodeTable"""

class RestType(db.Model):
    """entity of rest type."""

class RestFoodType(db.Model):
    """This is a CodeTable"""

class RestAvgSpend(db.Model):
    """This is a CodeTable"""

class RestOccation(db.Model):
    """This is a CodeTable"""

class RestDistrict(db.Model):
    """This is a CodeTable"""

class RestGroup(db.Model):
    """This is a CodeTable"""

class RestGoogleMap(db.Model):
    """google map mapping to restaurant"""






class RestKeyWord(db.Model):
    """This is a CodeTable"""


class RestType(db.Model):
    """This is a CodeTable"""
    rest_type_short = db.StringProperty()
    rest_type_big5 = db.StringProperty()
    rest_type_eng = db.StringProperty()
    rest_type_gb = db.StringProperty()

class RestPromotion(db.Model):
    """one to many,one restaurant may has more than one promotions"""
    title = db.StringProperty
#    rest = db.ReferenceProperty(Restaurant, collection_name='rest_promotion')